import { Tools } from 'weaver-mobile';

// 获取报告
export const getPlanView = params => {
	let options = {
		method: 'GET',
		url: '/api/workrelate/plan/getPlanDetail',
		params: {...params}
	};
	return Tools.callApi(options);
}

//保存或者提交报告
export const saveOrSubmitPlan = params=>{
	let options = {
		method: 'POST',
		url: '/api/workrelate/plan/saveOrSubmitPlan',
		params: {...params}
	};
	return Tools.callApi(options);
}
// 删除报告
export const deletePlanView = params => {
	let options = {
		method: 'GET',
		url: '/api/workrelate/plan/deletePlan',
		params: {...params}
	};
	return Tools.callApi(options);
}
// 重置报告
export const resetPlan = params => {
	let options = {
		method: 'GET',
		url: '/api/workrelate/plan/resetPlan',
		params: {...params}
	};
	return Tools.callApi(options);
}
//保存意见反馈
export const saveFeedback = params=>{
	let options = {
		method: 'POST',
		url: '/api/workrelate/plan/addPlanExchange',
		params: {...params}
	};
	return Tools.callApi(options);
}
//设置共享setPlanShare
export const setPlanShare = params=>{
	let options = {
		method: 'get',
		url: '/api/workrelate/plan/setPlanShare',
		params: {...params}
	};
	return Tools.callApi(options);
}
//获取报告log
export const getPlanLog = params => {
	let options = {
		method: 'GET',
		url: '/api/workrelate/plan/getPlanLog',
		params: {...params}
	};
	return Tools.callApi(options);
}

//报告detail
export const getDetailView = params => {
	let options = {
		method: 'GET',
		url: '/api/workrelate/plan/getDetailView',
		params: {...params}
	};
	return Tools.callApi(options);
}
//保存报告详情
export const saveDetailView = params => {
	let options = {
		method: 'post',
		url: '/api/workrelate/plan/saveDetailView',
		params: {...params}
	};
	return Tools.callApi(options);
}
//报告查询
export const planResult = params => {
	let options = {
		method: 'post',
		url: '/api/workrelate/plan/getResultListTable',
		params: {...params}
	};
	return Tools.callApi(options);
}
//审批查询
export const planAuditList = params => {
	let options = {
		method: 'post',
		url: '/api/workrelate/plan/getAuditListTable',
		params: {...params}
	};
	return Tools.callApi(options);
}
//审批
export const auditBatch = params => {
	let options = {
		method: 'post',
		url: '/api/workrelate/plan/auditOperation',
		params: {...params}
	};
	return Tools.callApi(options);
}
//单个审批
export const auditSingle = params => {
	let options = {
		method: 'get',
		url: '/api/workrelate/plan/auditPlan',
		params: {...params}
	};
	return Tools.callApi(options);
}
//get condition
export const getPlanViewNewCondition = params => {
	let options = {
		method: 'get',
		url: '/api/workrelate/plan/getNewCondition',
		params: {...params}
	};
	return Tools.callApi(options);
}
//getweek year currentValue
export const getWeek = params => {
	let options = {
		method: 'get',
		url: '/api/workrelate/plan/getweek',
		params: {...params}
	};
	return Tools.callApi(options);
}
//新增任务
export const addTask = params => {
	let options = {
		method: 'POST',
		url: '/api/workrelate/task/addTask',
		params: {...params}
	};
	return Tools.callApi(options);
}

export const noAuditCount = params => {//未审核
	let options = {
		method: 'POST',
		url: '/api/workrelate/plan/noAuditCount',
		params: {...params}
	};
	return Tools.callApi(options);
}


//设置分享
export const setShare = params => {
	let options = {
		method: 'POST',
		url: '/api/workrelate/common/workrelateShare',
		params: {...params}
	};
	return Tools.callApi(options);
}
